package cn.edu.scau.cmi.liuan.exp4;

public class ObjectAdapter implements Target {
	
	Adaptee a;
	int input,output;
	
	public ObjectAdapter(Adaptee a) {
		this.a = a;
	}
	
	@Override
	public int outPut5V() {
		input=a.outPut220V();
		output=input/44;
		return output;
	}
	
	public String toString() {
		return "对象适配器"+this.getClass().getName()+"把"+input+"电压转换成"+output+"电压";
	}
}